package com.example.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 李俊
 * @Description
 * @Date 2021/7/14 18:03
 */
@RefreshScope
@RestController
public class ConfigController {

    @Value("${project.name}")
    private String projectName;

    @RequestMapping(value = "/get", method = RequestMethod.GET)
    public String get() {
        return projectName;
    }
}
